

<!DOCTYPE html>
<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
<head>
  <meta charset="utf-8">
  
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  
  <title>argoverse.visualization.visualize_sequences &mdash; argoverse  documentation</title>
  

  
  
  
  

  
  <script type="text/javascript" src="../../../_static/js/modernizr.min.js"></script>
  
    
      <script type="text/javascript" id="documentation_options" data-url_root="../../../" src="../../../_static/documentation_options.js"></script>
        <script type="text/javascript" src="../../../_static/jquery.js"></script>
        <script type="text/javascript" src="../../../_static/underscore.js"></script>
        <script type="text/javascript" src="../../../_static/doctools.js"></script>
        <script type="text/javascript" src="../../../_static/language_data.js"></script>
    
    <script type="text/javascript" src="../../../_static/js/theme.js"></script>

    

  
  <link rel="stylesheet" href="../../../_static/css/theme.css" type="text/css" />
  <link rel="stylesheet" href="../../../_static/pygments.css" type="text/css" />
  <link rel="stylesheet" href="../../../_static/graphviz.css" type="text/css" />
    <link rel="index" title="Index" href="../../../genindex.html" />
    <link rel="search" title="Search" href="../../../search.html" /> 
</head>

<body class="wy-body-for-nav">

   
  <div class="wy-grid-for-nav">
    
    <nav data-toggle="wy-nav-shift" class="wy-nav-side">
      <div class="wy-side-scroll">
        <div class="wy-side-nav-search" >
          

          
            <a href="../../../index.html" class="icon icon-home"> argoverse
          

          
          </a>

          
            
            
          

          
<div role="search">
  <form id="rtd-search-form" class="wy-form" action="../../../search.html" method="get">
    <input type="text" name="q" placeholder="Search docs" />
    <input type="hidden" name="check_keywords" value="yes" />
    <input type="hidden" name="area" value="default" />
  </form>
</div>

          
        </div>

        <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
          
            
            
              
            
            
              <!-- Local TOC -->
              <div class="local-toc"></div>
            
          
        </div>
      </div>
    </nav>

    <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">

      
      <nav class="wy-nav-top" aria-label="top navigation">
        
          <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
          <a href="../../../index.html">argoverse</a>
        
      </nav>


      <div class="wy-nav-content">
        
        <div class="rst-content">
        
          















<div role="navigation" aria-label="breadcrumbs navigation">

  <ul class="wy-breadcrumbs">
    
      <li><a href="../../../index.html">Docs</a> &raquo;</li>
        
          <li><a href="../../index.html">Module code</a> &raquo;</li>
        
      <li>argoverse.visualization.visualize_sequences</li>
    
    
      <li class="wy-breadcrumbs-aside">
        
      </li>
    
  </ul>

  
  <hr/>
</div>
          <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
           <div itemprop="articleBody">
            
  <h1>Source code for argoverse.visualization.visualize_sequences</h1><div class="highlight"><pre>
<span></span><span class="ch">#!/usr/bin/env python</span>

<span class="sd">&quot;&quot;&quot;A simple python script template.&quot;&quot;&quot;</span>
<span class="kn">import</span> <span class="nn">argparse</span>
<span class="kn">import</span> <span class="nn">os</span>
<span class="kn">import</span> <span class="nn">shutil</span>
<span class="kn">import</span> <span class="nn">sys</span>
<span class="kn">from</span> <span class="nn">collections</span> <span class="k">import</span> <span class="n">defaultdict</span>
<span class="kn">from</span> <span class="nn">typing</span> <span class="k">import</span> <span class="n">Dict</span><span class="p">,</span> <span class="n">Optional</span>

<span class="kn">import</span> <span class="nn">matplotlib.animation</span> <span class="k">as</span> <span class="nn">anim</span>
<span class="kn">import</span> <span class="nn">matplotlib.lines</span> <span class="k">as</span> <span class="nn">mlines</span>
<span class="kn">import</span> <span class="nn">matplotlib.pyplot</span> <span class="k">as</span> <span class="nn">plt</span>
<span class="kn">import</span> <span class="nn">numpy</span> <span class="k">as</span> <span class="nn">np</span>
<span class="kn">import</span> <span class="nn">pandas</span> <span class="k">as</span> <span class="nn">pd</span>
<span class="kn">import</span> <span class="nn">scipy.interpolate</span> <span class="k">as</span> <span class="nn">interp</span>
<span class="kn">from</span> <span class="nn">argoverse.map_representation.map_api</span> <span class="k">import</span> <span class="n">ArgoverseMap</span>

<span class="n">_ZORDER</span> <span class="o">=</span> <span class="p">{</span><span class="s2">&quot;AGENT&quot;</span><span class="p">:</span> <span class="mi">15</span><span class="p">,</span> <span class="s2">&quot;AV&quot;</span><span class="p">:</span> <span class="mi">10</span><span class="p">,</span> <span class="s2">&quot;OTHERS&quot;</span><span class="p">:</span> <span class="mi">5</span><span class="p">}</span>


<div class="viewcode-block" id="interpolate_polyline"><a class="viewcode-back" href="../../../argoverse.visualization.html#argoverse.visualization.visualize_sequences.interpolate_polyline">[docs]</a><span class="k">def</span> <span class="nf">interpolate_polyline</span><span class="p">(</span><span class="n">polyline</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">ndarray</span><span class="p">,</span> <span class="n">num_points</span><span class="p">:</span> <span class="nb">int</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="n">np</span><span class="o">.</span><span class="n">ndarray</span><span class="p">:</span>
    <span class="n">duplicates</span> <span class="o">=</span> <span class="p">[]</span>
    <span class="k">for</span> <span class="n">i</span> <span class="ow">in</span> <span class="nb">range</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span> <span class="nb">len</span><span class="p">(</span><span class="n">polyline</span><span class="p">)):</span>
        <span class="k">if</span> <span class="n">np</span><span class="o">.</span><span class="n">allclose</span><span class="p">(</span><span class="n">polyline</span><span class="p">[</span><span class="n">i</span><span class="p">],</span> <span class="n">polyline</span><span class="p">[</span><span class="n">i</span> <span class="o">-</span> <span class="mi">1</span><span class="p">]):</span>
            <span class="n">duplicates</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">i</span><span class="p">)</span>
    <span class="k">if</span> <span class="n">polyline</span><span class="o">.</span><span class="n">shape</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="o">-</span> <span class="nb">len</span><span class="p">(</span><span class="n">duplicates</span><span class="p">)</span> <span class="o">&lt;</span> <span class="mi">4</span><span class="p">:</span>
        <span class="k">return</span> <span class="n">polyline</span>
    <span class="k">if</span> <span class="n">duplicates</span><span class="p">:</span>
        <span class="n">polyline</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">delete</span><span class="p">(</span><span class="n">polyline</span><span class="p">,</span> <span class="n">duplicates</span><span class="p">,</span> <span class="n">axis</span><span class="o">=</span><span class="mi">0</span><span class="p">)</span>
    <span class="n">tck</span><span class="p">,</span> <span class="n">u</span> <span class="o">=</span> <span class="n">interp</span><span class="o">.</span><span class="n">splprep</span><span class="p">(</span><span class="n">polyline</span><span class="o">.</span><span class="n">T</span><span class="p">,</span> <span class="n">s</span><span class="o">=</span><span class="mi">0</span><span class="p">)</span>
    <span class="n">u</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">linspace</span><span class="p">(</span><span class="mf">0.0</span><span class="p">,</span> <span class="mf">1.0</span><span class="p">,</span> <span class="n">num_points</span><span class="p">)</span>
    <span class="k">return</span> <span class="n">np</span><span class="o">.</span><span class="n">column_stack</span><span class="p">(</span><span class="n">interp</span><span class="o">.</span><span class="n">splev</span><span class="p">(</span><span class="n">u</span><span class="p">,</span> <span class="n">tck</span><span class="p">))</span></div>


<div class="viewcode-block" id="viz_sequence"><a class="viewcode-back" href="../../../argoverse.visualization.html#argoverse.visualization.visualize_sequences.viz_sequence">[docs]</a><span class="k">def</span> <span class="nf">viz_sequence</span><span class="p">(</span>
    <span class="n">df</span><span class="p">:</span> <span class="n">pd</span><span class="o">.</span><span class="n">DataFrame</span><span class="p">,</span> <span class="n">lane_centerlines</span><span class="p">:</span> <span class="n">Optional</span><span class="p">[</span><span class="n">np</span><span class="o">.</span><span class="n">ndarray</span><span class="p">]</span> <span class="o">=</span> <span class="kc">None</span><span class="p">,</span> <span class="n">show</span><span class="p">:</span> <span class="nb">bool</span> <span class="o">=</span> <span class="kc">True</span><span class="p">,</span> <span class="n">smoothen</span><span class="p">:</span> <span class="nb">bool</span> <span class="o">=</span> <span class="kc">False</span>
<span class="p">)</span> <span class="o">-&gt;</span> <span class="kc">None</span><span class="p">:</span>

    <span class="c1"># Seq data</span>
    <span class="n">time_list</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">sort</span><span class="p">(</span><span class="n">np</span><span class="o">.</span><span class="n">unique</span><span class="p">(</span><span class="n">df</span><span class="p">[</span><span class="s2">&quot;TIMESTAMP&quot;</span><span class="p">]</span><span class="o">.</span><span class="n">values</span><span class="p">))</span>
    <span class="n">city_name</span> <span class="o">=</span> <span class="n">df</span><span class="p">[</span><span class="s2">&quot;CITY_NAME&quot;</span><span class="p">]</span><span class="o">.</span><span class="n">values</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span>

    <span class="k">if</span> <span class="n">lane_centerlines</span> <span class="ow">is</span> <span class="kc">None</span><span class="p">:</span>
        <span class="c1"># Get API for Argo Dataset map</span>
        <span class="n">avm</span> <span class="o">=</span> <span class="n">ArgoverseMap</span><span class="p">()</span>
        <span class="n">seq_lane_bbox</span> <span class="o">=</span> <span class="n">avm</span><span class="o">.</span><span class="n">city_halluc_bbox_table</span><span class="p">[</span><span class="n">city_name</span><span class="p">]</span>
        <span class="n">seq_lane_props</span> <span class="o">=</span> <span class="n">avm</span><span class="o">.</span><span class="n">city_lane_centerlines_dict</span><span class="p">[</span><span class="n">city_name</span><span class="p">]</span>

    <span class="n">plt</span><span class="o">.</span><span class="n">figure</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span> <span class="n">figsize</span><span class="o">=</span><span class="p">(</span><span class="mi">8</span><span class="p">,</span> <span class="mi">7</span><span class="p">))</span>

    <span class="n">x_min</span> <span class="o">=</span> <span class="nb">min</span><span class="p">(</span><span class="n">df</span><span class="p">[</span><span class="s2">&quot;X&quot;</span><span class="p">])</span>
    <span class="n">x_max</span> <span class="o">=</span> <span class="nb">max</span><span class="p">(</span><span class="n">df</span><span class="p">[</span><span class="s2">&quot;X&quot;</span><span class="p">])</span>
    <span class="n">y_min</span> <span class="o">=</span> <span class="nb">min</span><span class="p">(</span><span class="n">df</span><span class="p">[</span><span class="s2">&quot;Y&quot;</span><span class="p">])</span>
    <span class="n">y_max</span> <span class="o">=</span> <span class="nb">max</span><span class="p">(</span><span class="n">df</span><span class="p">[</span><span class="s2">&quot;Y&quot;</span><span class="p">])</span>

    <span class="k">if</span> <span class="n">lane_centerlines</span> <span class="ow">is</span> <span class="kc">None</span><span class="p">:</span>

        <span class="n">plt</span><span class="o">.</span><span class="n">xlim</span><span class="p">(</span><span class="n">x_min</span><span class="p">,</span> <span class="n">x_max</span><span class="p">)</span>
        <span class="n">plt</span><span class="o">.</span><span class="n">ylim</span><span class="p">(</span><span class="n">y_min</span><span class="p">,</span> <span class="n">y_max</span><span class="p">)</span>

        <span class="n">lane_centerlines</span> <span class="o">=</span> <span class="p">[]</span>
        <span class="c1"># Get lane centerlines which lie within the range of trajectories</span>
        <span class="k">for</span> <span class="n">lane_id</span><span class="p">,</span> <span class="n">lane_props</span> <span class="ow">in</span> <span class="n">seq_lane_props</span><span class="o">.</span><span class="n">items</span><span class="p">():</span>

            <span class="n">lane_cl</span> <span class="o">=</span> <span class="n">lane_props</span><span class="o">.</span><span class="n">centerline</span>

            <span class="k">if</span> <span class="p">(</span>
                <span class="n">np</span><span class="o">.</span><span class="n">min</span><span class="p">(</span><span class="n">lane_cl</span><span class="p">[:,</span> <span class="mi">0</span><span class="p">])</span> <span class="o">&lt;</span> <span class="n">x_max</span>
                <span class="ow">and</span> <span class="n">np</span><span class="o">.</span><span class="n">min</span><span class="p">(</span><span class="n">lane_cl</span><span class="p">[:,</span> <span class="mi">1</span><span class="p">])</span> <span class="o">&lt;</span> <span class="n">y_max</span>
                <span class="ow">and</span> <span class="n">np</span><span class="o">.</span><span class="n">max</span><span class="p">(</span><span class="n">lane_cl</span><span class="p">[:,</span> <span class="mi">0</span><span class="p">])</span> <span class="o">&gt;</span> <span class="n">x_min</span>
                <span class="ow">and</span> <span class="n">np</span><span class="o">.</span><span class="n">max</span><span class="p">(</span><span class="n">lane_cl</span><span class="p">[:,</span> <span class="mi">1</span><span class="p">])</span> <span class="o">&gt;</span> <span class="n">y_min</span>
            <span class="p">):</span>
                <span class="n">lane_centerlines</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">lane_cl</span><span class="p">)</span>

    <span class="k">for</span> <span class="n">lane_cl</span> <span class="ow">in</span> <span class="n">lane_centerlines</span><span class="p">:</span>
        <span class="n">plt</span><span class="o">.</span><span class="n">plot</span><span class="p">(</span><span class="n">lane_cl</span><span class="p">[:,</span> <span class="mi">0</span><span class="p">],</span> <span class="n">lane_cl</span><span class="p">[:,</span> <span class="mi">1</span><span class="p">],</span> <span class="s2">&quot;--&quot;</span><span class="p">,</span> <span class="n">color</span><span class="o">=</span><span class="s2">&quot;grey&quot;</span><span class="p">,</span> <span class="n">alpha</span><span class="o">=</span><span class="mi">1</span><span class="p">,</span> <span class="n">linewidth</span><span class="o">=</span><span class="mi">1</span><span class="p">,</span> <span class="n">zorder</span><span class="o">=</span><span class="mi">0</span><span class="p">)</span>
    <span class="n">frames</span> <span class="o">=</span> <span class="n">df</span><span class="o">.</span><span class="n">groupby</span><span class="p">(</span><span class="s2">&quot;TRACK_ID&quot;</span><span class="p">)</span>

    <span class="n">plt</span><span class="o">.</span><span class="n">xlabel</span><span class="p">(</span><span class="s2">&quot;Map X&quot;</span><span class="p">)</span>
    <span class="n">plt</span><span class="o">.</span><span class="n">ylabel</span><span class="p">(</span><span class="s2">&quot;Map Y&quot;</span><span class="p">)</span>

    <span class="n">color_dict</span> <span class="o">=</span> <span class="p">{</span><span class="s2">&quot;AGENT&quot;</span><span class="p">:</span> <span class="s2">&quot;#d33e4c&quot;</span><span class="p">,</span> <span class="s2">&quot;OTHERS&quot;</span><span class="p">:</span> <span class="s2">&quot;#d3e8ef&quot;</span><span class="p">,</span> <span class="s2">&quot;AV&quot;</span><span class="p">:</span> <span class="s2">&quot;#007672&quot;</span><span class="p">}</span>
    <span class="n">object_type_tracker</span><span class="p">:</span> <span class="n">Dict</span><span class="p">[</span><span class="nb">int</span><span class="p">,</span> <span class="nb">int</span><span class="p">]</span> <span class="o">=</span> <span class="n">defaultdict</span><span class="p">(</span><span class="nb">int</span><span class="p">)</span>

    <span class="c1"># Plot all the tracks up till current frame</span>
    <span class="k">for</span> <span class="n">group_name</span><span class="p">,</span> <span class="n">group_data</span> <span class="ow">in</span> <span class="n">frames</span><span class="p">:</span>
        <span class="n">object_type</span> <span class="o">=</span> <span class="n">group_data</span><span class="p">[</span><span class="s2">&quot;OBJECT_TYPE&quot;</span><span class="p">]</span><span class="o">.</span><span class="n">values</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span>

        <span class="n">cor_x</span> <span class="o">=</span> <span class="n">group_data</span><span class="p">[</span><span class="s2">&quot;X&quot;</span><span class="p">]</span><span class="o">.</span><span class="n">values</span>
        <span class="n">cor_y</span> <span class="o">=</span> <span class="n">group_data</span><span class="p">[</span><span class="s2">&quot;Y&quot;</span><span class="p">]</span><span class="o">.</span><span class="n">values</span>

        <span class="k">if</span> <span class="n">smoothen</span><span class="p">:</span>
            <span class="n">polyline</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">column_stack</span><span class="p">((</span><span class="n">cor_x</span><span class="p">,</span> <span class="n">cor_y</span><span class="p">))</span>
            <span class="n">num_points</span> <span class="o">=</span> <span class="n">cor_x</span><span class="o">.</span><span class="n">shape</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="o">*</span> <span class="mi">3</span>
            <span class="n">smooth_polyline</span> <span class="o">=</span> <span class="n">interpolate_polyline</span><span class="p">(</span><span class="n">polyline</span><span class="p">,</span> <span class="n">num_points</span><span class="p">)</span>
            <span class="n">cor_x</span> <span class="o">=</span> <span class="n">smooth_polyline</span><span class="p">[:,</span> <span class="mi">0</span><span class="p">]</span>
            <span class="n">cor_y</span> <span class="o">=</span> <span class="n">smooth_polyline</span><span class="p">[:,</span> <span class="mi">1</span><span class="p">]</span>

        <span class="n">plt</span><span class="o">.</span><span class="n">plot</span><span class="p">(</span>
            <span class="n">cor_x</span><span class="p">,</span>
            <span class="n">cor_y</span><span class="p">,</span>
            <span class="s2">&quot;-&quot;</span><span class="p">,</span>
            <span class="n">color</span><span class="o">=</span><span class="n">color_dict</span><span class="p">[</span><span class="n">object_type</span><span class="p">],</span>
            <span class="n">label</span><span class="o">=</span><span class="n">object_type</span> <span class="k">if</span> <span class="ow">not</span> <span class="n">object_type_tracker</span><span class="p">[</span><span class="n">object_type</span><span class="p">]</span> <span class="k">else</span> <span class="s2">&quot;&quot;</span><span class="p">,</span>
            <span class="n">alpha</span><span class="o">=</span><span class="mi">1</span><span class="p">,</span>
            <span class="n">linewidth</span><span class="o">=</span><span class="mi">1</span><span class="p">,</span>
            <span class="n">zorder</span><span class="o">=</span><span class="n">_ZORDER</span><span class="p">[</span><span class="n">object_type</span><span class="p">],</span>
        <span class="p">)</span>

        <span class="n">final_x</span> <span class="o">=</span> <span class="n">cor_x</span><span class="p">[</span><span class="o">-</span><span class="mi">1</span><span class="p">]</span>
        <span class="n">final_y</span> <span class="o">=</span> <span class="n">cor_y</span><span class="p">[</span><span class="o">-</span><span class="mi">1</span><span class="p">]</span>

        <span class="k">if</span> <span class="n">object_type</span> <span class="o">==</span> <span class="s2">&quot;AGENT&quot;</span><span class="p">:</span>
            <span class="n">marker_type</span> <span class="o">=</span> <span class="s2">&quot;o&quot;</span>
            <span class="n">marker_size</span> <span class="o">=</span> <span class="mi">7</span>
        <span class="k">elif</span> <span class="n">object_type</span> <span class="o">==</span> <span class="s2">&quot;OTHERS&quot;</span><span class="p">:</span>
            <span class="n">marker_type</span> <span class="o">=</span> <span class="s2">&quot;o&quot;</span>
            <span class="n">marker_size</span> <span class="o">=</span> <span class="mi">7</span>
        <span class="k">elif</span> <span class="n">object_type</span> <span class="o">==</span> <span class="s2">&quot;AV&quot;</span><span class="p">:</span>
            <span class="n">marker_type</span> <span class="o">=</span> <span class="s2">&quot;o&quot;</span>
            <span class="n">marker_size</span> <span class="o">=</span> <span class="mi">7</span>

        <span class="n">plt</span><span class="o">.</span><span class="n">plot</span><span class="p">(</span>
            <span class="n">final_x</span><span class="p">,</span>
            <span class="n">final_y</span><span class="p">,</span>
            <span class="n">marker_type</span><span class="p">,</span>
            <span class="n">color</span><span class="o">=</span><span class="n">color_dict</span><span class="p">[</span><span class="n">object_type</span><span class="p">],</span>
            <span class="n">label</span><span class="o">=</span><span class="n">object_type</span> <span class="k">if</span> <span class="ow">not</span> <span class="n">object_type_tracker</span><span class="p">[</span><span class="n">object_type</span><span class="p">]</span> <span class="k">else</span> <span class="s2">&quot;&quot;</span><span class="p">,</span>
            <span class="n">alpha</span><span class="o">=</span><span class="mi">1</span><span class="p">,</span>
            <span class="n">markersize</span><span class="o">=</span><span class="n">marker_size</span><span class="p">,</span>
            <span class="n">zorder</span><span class="o">=</span><span class="n">_ZORDER</span><span class="p">[</span><span class="n">object_type</span><span class="p">],</span>
        <span class="p">)</span>

        <span class="n">object_type_tracker</span><span class="p">[</span><span class="n">object_type</span><span class="p">]</span> <span class="o">+=</span> <span class="mi">1</span>

    <span class="n">red_star</span> <span class="o">=</span> <span class="n">mlines</span><span class="o">.</span><span class="n">Line2D</span><span class="p">([],</span> <span class="p">[],</span> <span class="n">color</span><span class="o">=</span><span class="s2">&quot;red&quot;</span><span class="p">,</span> <span class="n">marker</span><span class="o">=</span><span class="s2">&quot;*&quot;</span><span class="p">,</span> <span class="n">linestyle</span><span class="o">=</span><span class="s2">&quot;None&quot;</span><span class="p">,</span> <span class="n">markersize</span><span class="o">=</span><span class="mi">7</span><span class="p">,</span> <span class="n">label</span><span class="o">=</span><span class="s2">&quot;Agent&quot;</span><span class="p">)</span>
    <span class="n">green_circle</span> <span class="o">=</span> <span class="n">mlines</span><span class="o">.</span><span class="n">Line2D</span><span class="p">([],</span> <span class="p">[],</span> <span class="n">color</span><span class="o">=</span><span class="s2">&quot;green&quot;</span><span class="p">,</span> <span class="n">marker</span><span class="o">=</span><span class="s2">&quot;o&quot;</span><span class="p">,</span> <span class="n">linestyle</span><span class="o">=</span><span class="s2">&quot;None&quot;</span><span class="p">,</span> <span class="n">markersize</span><span class="o">=</span><span class="mi">7</span><span class="p">,</span> <span class="n">label</span><span class="o">=</span><span class="s2">&quot;Others&quot;</span><span class="p">)</span>
    <span class="n">black_triangle</span> <span class="o">=</span> <span class="n">mlines</span><span class="o">.</span><span class="n">Line2D</span><span class="p">([],</span> <span class="p">[],</span> <span class="n">color</span><span class="o">=</span><span class="s2">&quot;black&quot;</span><span class="p">,</span> <span class="n">marker</span><span class="o">=</span><span class="s2">&quot;^&quot;</span><span class="p">,</span> <span class="n">linestyle</span><span class="o">=</span><span class="s2">&quot;None&quot;</span><span class="p">,</span> <span class="n">markersize</span><span class="o">=</span><span class="mi">7</span><span class="p">,</span> <span class="n">label</span><span class="o">=</span><span class="s2">&quot;AV&quot;</span><span class="p">)</span>

    <span class="n">plt</span><span class="o">.</span><span class="n">axis</span><span class="p">(</span><span class="s2">&quot;off&quot;</span><span class="p">)</span>
    <span class="k">if</span> <span class="n">show</span><span class="p">:</span>
        <span class="n">plt</span><span class="o">.</span><span class="n">show</span><span class="p">()</span></div>
</pre></div>

           </div>
           
          </div>
          <footer>
  

  <hr/>

  <div role="contentinfo">
    <p>
        &copy; Copyright 2019, Argo AI, LLC

    </p>
  </div>
  Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/rtfd/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>. 

</footer>

        </div>
      </div>

    </section>

  </div>
  


  <script type="text/javascript">
      jQuery(function () {
          SphinxRtdTheme.Navigation.enable(true);
      });
  </script>

  
  
    
   

</body>
</html>